package com.athuahua.spzx.service;

import com.athuahua.spzx.dto.h5.UserLoginDto;
import com.athuahua.spzx.dto.h5.UserRegisterDto;
import com.athuahua.spzx.entity.UserInfo;
import com.athuahua.spzx.vo.h5.UserInfoVo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author huahua
* @description 针对表【user_info(会员表)】的数据库操作Service
* @createDate 2024-08-13 16:04:25
*/
public interface UserInfoService extends IService<UserInfo> {

    /**
     * 用户注册
     * @param userRegisterDto
     */
    void register(UserRegisterDto userRegisterDto);

    /**
     * 用户登录
     * @param userLoginDto
     * @return
     */
    String login(UserLoginDto userLoginDto);

    /**
     * 获取当前用户信息
     * @return
     */
    UserInfoVo getCurrentUserInfo();

    /**
     * 是否在收藏中
     * @return
     */
    boolean isCollect(Long skuId);

    /**
     * 添加收藏
     * @param skuId
     */
    void collect(Long skuId);

    /**
     * 取消收藏
     * @param skuId
     */
    void cancelCollect(Long skuId);
}
